package com.itheima.day03.demo08;

public class Demo {
    public static void main(String[] args) {
        String s = "2123";
        String s1 = "21.23";
        int a = Integer.parseInt(s);
        System.out.println(a);

        /*int a1 = Integer.parseInt(s1);
        System.out.println("a1 = " + a1);*///报错

        double b = Double.parseDouble(s);
        System.out.println("b = " + b);

        double b1 = Double.parseDouble(s1);
        System.out.println("b1 = " + b1);

        Integer a3 = Integer.valueOf(s);
        System.out.println("a3 = " + a3);
        Double a4 = Double.valueOf(s1);
        System.out.println("a4 = " + a4);
    }
}
